src=add.cpp
obj=add.o
dynamic_lib=libadd.so

$(dynamic_lib):$(obj)
	g++ -shared $^ -o $@
$(obj):$(src)
	g++ -c $^ -o $@ -std=c++11

.PHONY:clean pack
clean:
	rm -f $(obj) $(dynamic_lib)
pack:
	mkdir -p ./package/include
	mkdir -p ./package/lib
	cp ./$(dynamic_lib) ./package/lib
	cp ./*.h ./package/include
	tar -czvf ./package.gz ./package

